<div class="page">
  <header class="bar bar-nav shop-header">
    <a class="icon icon-left pull-left" data-dismiss="push"></a>
    <h1 class="title">可用优惠券</h1>
  </header>

  <div class="content">

    {{#each coupons}}
    <div class="list-block media-list coupon-radio">
      <ul>
        <li>
          <label class="label-checkbox item-content">
            <div class="item-inner">
              <div class="item-text">
                {{#equal discount_type 0}}
                  <h2 class="coupon-amount">
                    <span>￥</span>{{currency amount 0}}
                  </h2>
                {{else}}
                  <h2 class="coupon-amount">
                    {{calculate amount 10 1}}<span>折</span>
                  </h2>
                {{/equal}}
                <div class="coupon-info">
                  <p class="coupon-title">{{template_name}}</p>
                  <p class="coupon-date">{{effective_start_date}}&nbsp;至&nbsp;{{effective_end_date}}</p>
                </div>
              </div>
            </div>
            <input type="radio" name="coupon-radio" value="{{id}}" {{ check ../selectedCouponId id 'checked' '' }}>
            <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
          </label>
        </li>
      </ul>
    </div>
    {{/each}}

  </div>
  <!-- End Content -->
</div>
